<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=9"/>
    <title>Wi-Fi Host Driver (WHD): whd_resource_source Struct Reference</title>
    <link href="tabs.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="dynsections.js"></script>
    <link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
    <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
    <link href="doxygen.css" rel="stylesheet" type="text/css" />
  </head>
  <body>
    <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
      <div id="titlearea" style="font-family:verdana;">
        <table border='0' cellpadding='0' cellspacing='0' width="98%">
          <tr style="height:20px"><td>&nbsp;</td></tr>
          <tr style="border-collapse: collapse; padding: 0;">
            <td style="width:20px"></td>
            <td style="width:117px"><img src="ifx_logo.png" alt="Infineon Logo" /></td>
            <td style="vertical-align:middle; text-align:center; font: bold 25px/100% Verdana, Arial, Helvetica, sans-serif;">
              Wi-Fi Host Driver (WHD) Public API Reference Guide
            </td>
          </tr>
          <tr><td>&nbsp;</td></tr>
        </table>
    </div>
    <!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('structwhd__resource__source.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-attribs">Data Fields</a>  </div>
  <div class="headertitle">
<div class="title">whd_resource_source Struct Reference<div class="ingroups"><a class="el" href="group__res.html">WHD Resource API</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<div class="textblock"><p>Interface to a data source that provides external resources to the radio driver. </p>
<p>This data structure defines a source for data generally intended to be downloaded to the radio device.</p>
<p>The data is assumed to be available as a set of blocks that are all the same size with the exception of the last block. The whd_get_resource_block_size function returns this block size. The whd_get_resource_block call returns a pointer to a block of data. The actual storage for the data block is owned by the data source, so only a pointer to the block is returned. There are two predominate use cases. If the data is stored in the internal flash memory, then whd_get_resource_no_of_blocks will return 1 and a call to whd_get_resource_block will return a pointer to the data image with the size being the size of the data image. If the data is stored in an external flash of some type, each block of data can be read from the external flash one at a time. whd_get_resource_no_of_blocks will return the physical number of blocks in the data and each call to whd_get_resource_block will read data from the external memory and make it available via an internal buffer. </p>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:ab2a3bf0a36362b733939361143158e02"><td class="memItemLeft" align="right" valign="top">uint32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structwhd__resource__source.html#ab2a3bf0a36362b733939361143158e02">whd_resource_size</a> )(<a class="el" href="whd_8h.html#ac45015d82e65db891b463066873eca4f">whd_driver_t</a> whd_drv, <a class="el" href="whd__resource__api_8h.html#a26c678527cf0cb5196be511d9ad62c0c">whd_resource_type_t</a> resource, uint32_t *size_out)</td></tr>
<tr class="memdesc:ab2a3bf0a36362b733939361143158e02"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the size of the resource for respective resource type.  <a href="#ab2a3bf0a36362b733939361143158e02">More...</a><br /></td></tr>
<tr class="separator:ab2a3bf0a36362b733939361143158e02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a621cec3fecb5491d46d3534a59b6862b"><td class="memItemLeft" align="right" valign="top">uint32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structwhd__resource__source.html#a621cec3fecb5491d46d3534a59b6862b">whd_get_resource_block</a> )(<a class="el" href="whd_8h.html#ac45015d82e65db891b463066873eca4f">whd_driver_t</a> whd_drv, <a class="el" href="whd__resource__api_8h.html#a26c678527cf0cb5196be511d9ad62c0c">whd_resource_type_t</a> type, uint32_t blockno, const uint8_t **data, uint32_t *size_out)</td></tr>
<tr class="memdesc:a621cec3fecb5491d46d3534a59b6862b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the resource block for specified resource type.  <a href="#a621cec3fecb5491d46d3534a59b6862b">More...</a><br /></td></tr>
<tr class="separator:a621cec3fecb5491d46d3534a59b6862b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2645315e933c6e65046bec5dad04b8e4"><td class="memItemLeft" align="right" valign="top">uint32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structwhd__resource__source.html#a2645315e933c6e65046bec5dad04b8e4">whd_get_resource_no_of_blocks</a> )(<a class="el" href="whd_8h.html#ac45015d82e65db891b463066873eca4f">whd_driver_t</a> whd_drv, <a class="el" href="whd__resource__api_8h.html#a26c678527cf0cb5196be511d9ad62c0c">whd_resource_type_t</a> type, uint32_t *block_count)</td></tr>
<tr class="memdesc:a2645315e933c6e65046bec5dad04b8e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets block count for the specified resource_type.  <a href="#a2645315e933c6e65046bec5dad04b8e4">More...</a><br /></td></tr>
<tr class="separator:a2645315e933c6e65046bec5dad04b8e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7ac61e99cc2504e39dfb220a34b8d39"><td class="memItemLeft" align="right" valign="top">uint32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structwhd__resource__source.html#af7ac61e99cc2504e39dfb220a34b8d39">whd_get_resource_block_size</a> )(<a class="el" href="whd_8h.html#ac45015d82e65db891b463066873eca4f">whd_driver_t</a> whd_drv, <a class="el" href="whd__resource__api_8h.html#a26c678527cf0cb5196be511d9ad62c0c">whd_resource_type_t</a> type, uint32_t *size_out)</td></tr>
<tr class="memdesc:af7ac61e99cc2504e39dfb220a34b8d39"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets block size for the specified resource_type.  <a href="#af7ac61e99cc2504e39dfb220a34b8d39">More...</a><br /></td></tr>
<tr class="separator:af7ac61e99cc2504e39dfb220a34b8d39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c9a11dcc9c8fd71189a97c3747c3e62"><td class="memItemLeft" align="right" valign="top">uint32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structwhd__resource__source.html#a0c9a11dcc9c8fd71189a97c3747c3e62">whd_resource_read</a> )(<a class="el" href="whd_8h.html#ac45015d82e65db891b463066873eca4f">whd_driver_t</a> whd_drv, <a class="el" href="whd__resource__api_8h.html#a26c678527cf0cb5196be511d9ad62c0c">whd_resource_type_t</a> type, uint32_t offset, uint32_t size, uint32_t *size_out, void *buffer)</td></tr>
<tr class="memdesc:a0c9a11dcc9c8fd71189a97c3747c3e62"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the resource for specified resource type.  <a href="#a0c9a11dcc9c8fd71189a97c3747c3e62">More...</a><br /></td></tr>
<tr class="separator:a0c9a11dcc9c8fd71189a97c3747c3e62"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Field Documentation</h2>
<a id="ab2a3bf0a36362b733939361143158e02"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab2a3bf0a36362b733939361143158e02">&#9670;&nbsp;</a></span>whd_resource_size</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t(* whd_resource_size) (<a class="el" href="whd_8h.html#ac45015d82e65db891b463066873eca4f">whd_driver_t</a> whd_drv, <a class="el" href="whd__resource__api_8h.html#a26c678527cf0cb5196be511d9ad62c0c">whd_resource_type_t</a> resource, uint32_t *size_out)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the size of the resource for respective resource type. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">whd_drv</td><td>Pointer to handle instance of the driver </td></tr>
    <tr><td class="paramname">resource</td><td>Type of resource - WHD_RESOURCE_WLAN_FIRMWARE, WHD_RESOURCE_WLAN_NVRAM, WHD_RESOURCE_WLAN_CLM </td></tr>
    <tr><td class="paramname">size_out</td><td>Size of the resource</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>WHD_SUCCESS or error code </dd></dl>

</div>
</div>
<a id="a621cec3fecb5491d46d3534a59b6862b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a621cec3fecb5491d46d3534a59b6862b">&#9670;&nbsp;</a></span>whd_get_resource_block</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t(* whd_get_resource_block) (<a class="el" href="whd_8h.html#ac45015d82e65db891b463066873eca4f">whd_driver_t</a> whd_drv, <a class="el" href="whd__resource__api_8h.html#a26c678527cf0cb5196be511d9ad62c0c">whd_resource_type_t</a> type, uint32_t blockno, const uint8_t **data, uint32_t *size_out)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the resource block for specified resource type. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">whd_drv</td><td>Pointer to handle instance of the driver </td></tr>
    <tr><td class="paramname">type</td><td>Type of resource - WHD_RESOURCE_WLAN_FIRMWARE, WHD_RESOURCE_WLAN_NVRAM, WHD_RESOURCE_WLAN_CLM </td></tr>
    <tr><td class="paramname">blockno</td><td>The number of block </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to a block of data </td></tr>
    <tr><td class="paramname">size_out</td><td>Size of the resource</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>WHD_SUCCESS or error code </dd></dl>

</div>
</div>
<a id="a2645315e933c6e65046bec5dad04b8e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2645315e933c6e65046bec5dad04b8e4">&#9670;&nbsp;</a></span>whd_get_resource_no_of_blocks</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t(* whd_get_resource_no_of_blocks) (<a class="el" href="whd_8h.html#ac45015d82e65db891b463066873eca4f">whd_driver_t</a> whd_drv, <a class="el" href="whd__resource__api_8h.html#a26c678527cf0cb5196be511d9ad62c0c">whd_resource_type_t</a> type, uint32_t *block_count)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets block count for the specified resource_type. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">whd_drv</td><td>Pointer to handle instance of the driver </td></tr>
    <tr><td class="paramname">type</td><td>Type of resource - WHD_RESOURCE_WLAN_FIRMWARE, WHD_RESOURCE_WLAN_NVRAM, WHD_RESOURCE_WLAN_CLM </td></tr>
    <tr><td class="paramname">block_count</td><td>Pointer to store block count for the resource</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>WHD_SUCCESS or error code </dd></dl>

</div>
</div>
<a id="af7ac61e99cc2504e39dfb220a34b8d39"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af7ac61e99cc2504e39dfb220a34b8d39">&#9670;&nbsp;</a></span>whd_get_resource_block_size</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t(* whd_get_resource_block_size) (<a class="el" href="whd_8h.html#ac45015d82e65db891b463066873eca4f">whd_driver_t</a> whd_drv, <a class="el" href="whd__resource__api_8h.html#a26c678527cf0cb5196be511d9ad62c0c">whd_resource_type_t</a> type, uint32_t *size_out)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets block size for the specified resource_type. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">whd_drv</td><td>Pointer to handle instance of the driver </td></tr>
    <tr><td class="paramname">type</td><td>Type of resources - WHD_RESOURCE_WLAN_FIRMWARE, WHD_RESOURCE_WLAN_NVRAM, WHD_RESOURCE_WLAN_CLM </td></tr>
    <tr><td class="paramname">size_out</td><td>Pointer to store size of the block</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>WHD_SUCCESS or error code </dd></dl>

</div>
</div>
<a id="a0c9a11dcc9c8fd71189a97c3747c3e62"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0c9a11dcc9c8fd71189a97c3747c3e62">&#9670;&nbsp;</a></span>whd_resource_read</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t(* whd_resource_read) (<a class="el" href="whd_8h.html#ac45015d82e65db891b463066873eca4f">whd_driver_t</a> whd_drv, <a class="el" href="whd__resource__api_8h.html#a26c678527cf0cb5196be511d9ad62c0c">whd_resource_type_t</a> type, uint32_t offset, uint32_t size, uint32_t *size_out, void *buffer)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the resource for specified resource type. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">whd_drv</td><td>Pointer to handle instance of the driver </td></tr>
    <tr><td class="paramname">type</td><td>Type of resource - WHD_RESOURCE_WLAN_FIRMWARE, WHD_RESOURCE_WLAN_NVRAM, WHD_RESOURCE_WLAN_CLM </td></tr>
    <tr><td class="paramname">offset</td><td>offset address to store buffer </td></tr>
    <tr><td class="paramname">size</td><td>Pointer to a size of buffer </td></tr>
    <tr><td class="paramname">size_out</td><td>Pointer to store size of buffer </td></tr>
    <tr><td class="paramname">buffer</td><td>Pointer to a buffer</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>WHD_SUCCESS or error code </dd></dl>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="whd__resource__api_8h.html">whd_resource_api.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
    <!-- start footer part -->
    <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
      <ul>
        <li class="navelem"><a class="el" href="structwhd__resource__source.html">whd_resource_source</a></li>
        <li class="footer">Copyright Infineon Technologies.</li>
      </ul>
    </div>
  </body>
</html>
